<?php

class CityModel extends Model {
		protected	$tableName	=	'tttuangou_city';

		function getcity($id=''){
				if($id==''){
						//$sql='select * from '.TABLE_PREFIX.'tttuangou_city where display >= 1';
						//$query = $this->DatabaseHandler->Query($sql);
						//$city=$query->GetAll();
						$city = $this->where("display >= 1")->findAll();
				}else{
						//$sql='select * from '.TABLE_PREFIX.'tttuangou_city where cityid = '.floatval($id);
						//$query = $this->DatabaseHandler->Query($sql);
						//$city=$query->GetRow();
						$city = $this->where('cityid = '.floatval($id))->findAll();
				}
				return $city;
		}
		
		function getcitylist(){
				//$sql='select * from '.TABLE_PREFIX.'tttuangou_city';
				//$query = $this->DatabaseHandler->Query($sql);
				//$city=$query->GetAll();
				$city = $this->where()->findAll();
				return $city;
		}
}
?>